<template>
  <div class="flex-al box">
    <build-el-h1 name="获奖查询.png" type="2"></build-el-h1>
    <el-input
      placeholder="请输入姓名"
      v-model="certificateSearch.licensee"
      size="medium"
      clearable
      style="margin-bottom:20px"
    ></el-input>
    <el-input
      placeholder="请输入档案标号"
      v-model="certificateSearch.number"
      size="medium"
      clearable
      style="margin-bottom:20px"
    ></el-input>

    <el-button type="primary" style="width:100%;margin-bottom:60px" @click="chaxun">查询</el-button>
  </div>
</template>
<script>
import buildElH1 from '../build-el-h1'
export default {
  components: {
    buildElH1,
  },
  data() {
    return {
      name: '',
      code: '',
      dataObj: null,
      certificateSearch: {
        number: '',
        licensee: '',
      },
    }
  },
  methods: {
    async chaxun() {
      if (this.certificateSearch.licensee == '') {
        this.$toast('姓名不能为空')
        return
      }
      if (this.certificateSearch.number == '') {
        this.$toast('编号不能为空')
        return
      }

      this.$router.push({
        name: 'bookSearch',
        query: {
          ...this.certificateSearch,
        },
      })
      // let dataObj = await this.api.verification(this.code, this.name)
      // this.dataObj = dataObj
    },
  },
}
</script>
<style lang="less" scoped>
.box {
  padding: 0 30px;
  margin-top: 45px;
  box-sizing: border-box;
  .warn-p {
    font-size: 14px;
    color: #bf1425;
    margin-bottom: 20px;
  }
  .success-p {
    font-size: 14px;
    color: green;
    margin-bottom: 20px;
  }
}
</style>